<?php
namespace app\admin\controller;

use think\Controller;
use think\Db;
use think\Request;
use \think\validate;
use app\admin\model\Index as dex;


class index extends Controller{
    private $model;

    public function __construct()
    {
        $this->model = new dex();
    }
    public function index()
    {
        return view('index/index');
    }
    public function main()
    {
        return view('index/main');
    }
    public function newsAdd()
    {
        return view('index/newsAdd');
    }
    public function newsAdmin()
    {
        return view('index/newsAdmin');
    }
    public function banner()
    {
        return view('index/banner');
    }
    public function newsImage()
    {
        return view('index/newsImage');
    }
    public function tonewsAdmin()
    {
        $news_list = $this->model->newsList();
        return json_encode($news_list);
    }



}